/**
  * An arena is the basic idea of an environment in which the players fight, to wit, a background and corresponding music.
  *
  * @author "Brian MacCarthy","Owen Grogan";
  * @created "2007-03-04 Brian MacCarthy";
  * @revised "$Date: 2007-03-06 19:11:00 $"; 
  */

package exfist;

import java.awt.image.BufferedImage;

import javax.swing.JComponent;

public class Arena extends JComponent
{
	String name;
	String music;
	BufferedImage background_img;
	Background bg;
	SpriteCache sc=new SpriteCache();
	Music mus;
	
	protected Arena()
	{
		this.setArenaName("default");
		bg=new Background();
		this.add(bg);
		bg.setSize(1024, 768);
		background_img=sc.getSprite("/Backdrops/Indoor.gif");
		//new Music();
		//mus.playMusic();
	}
	/**
	 * Returns the name of the arena
	 * @return String of arena name
	 */
	private String getArenaName()
	{
		return name;
	}
	/**
	 * returns name of arena music
	 * @return String of music name
	 */
	private String getArenaMusic()
	{
		return music;
	}
	/**
	 * returns the arena background
	 * @return BufferendImage: the background
	 */
	public BufferedImage getArenaBackground()
	{
		return background_img;
	}
	/**
	 * Sets the name of the Arena
	 * @param n the name to be used
	 */
	private void setArenaName(String n)
	{
		name = n;
	}
	/**
	 * sets the arena background
	 * @param b the background to be used
	 */
	protected void setArenaBackground(String b)
	{
		background_img = sc.getSprite(b);
		bg.switchBackground(b);
		bg.repaint();
	}
}
